import React, { useEffect } from "react";
// import NIM from '../../sdk/NIM_Web_NIM_v6.7.0';
const NIM = window.NIM;
const JSX = () => {
    console.log(12321321321321,NIM);
    const initSDK = () => {
        const account = '5d519c2127332529236b032b3f0f304e';
        const appKey = '9b996ff8e89e46b14b86dd2738b91355';
        const  token = '8b9ac8c5e95e16ed69375cd19f73ec00';


        // console.log(1888868,NIM.getInstance(Parameters));
        const initStart = new NIM({
            appKey,
            account,
            token,
            onconnect: () => {
                alert('链接成功');
            },
            ondisconnect: function (obj) {
                console.log('SDK 连接断开', obj);
                alert('SDK 连接失败', obj);
            },
            onerror: function (error) {
                alert('SDK 连接失败', error)
            },
            onroamingmsgs: function (obj) {
                console.log('漫游消息', obj);
            },
            onMsg: function (msg) {
                console.log('收到消息', msg.scene, msg.type, msg);
            }
        });
    };
    useEffect(() => {
       initSDK();
    });
    return(
        <h1>123</h1>
    )
};

export default React.memo(JSX);